package com.ruoyi.common.constant;

/**
 * Redis key管理.
 *
 * @author
 */
public class RedisKey {

    public static class Dict {

        public static String getAppRecommendKey(Long appId) {
            return "s:ar:" + appId;
        }

        public static String getAppRecommendListKey(Integer type) {
            String key = "s:ar:list";
            return type > 0 ? key + type : key;
        }

        public static String CizuDetailKey() {
            return "h:cizu:detail";
        }

        public static String CizuKey(String cizu) {
            return "d:cizu:" + cizu;
        }

        public static String getZiKey(String zi) {
            return "d:zi:" + zi;
        }
    }

    public static class Common {

        public final static String MODULE = "common";

        public static String getAppConfigKey(String app, String configKey) {
            return MODULE + ":config:" + app + ":" + configKey;
        }

    }

    public static class Ad {

        public final static String MODULE = "kkad";

        public static String getChannelSwithKey() {
            return MODULE + "_channel_swith_key";
        }

        public static String getAdvertisingListKey(String platform, String appId, String placeCode) {
            return MODULE + "_advertising_list_key:" + platform + ":" + appId + ":" + placeCode;
        }

        public static String getAdvertisingPlaceKey() {
            return "kkredis:" + "com.lizhi.kkc.model.AdvertisingPlace_key";
        }

        public static String getAdvertisingKey() {
            return "kkredis:" + "com.lizhi.kkc.model.Advertising_key";
        }

    }
}
